package com.itmayiedu.sql;

import com.itmayiedu.annotation.ExtMapper;
import com.itmayiedu.aop.MyInvocationHandlerMbatis;

import java.lang.reflect.Proxy;

public class SqlSession {

    public static <T> T getMapper(Class classz){
        return (T) Proxy.newProxyInstance(classz.getClassLoader(),new Class<?>[]{classz},new  MyInvocationHandlerMbatis(classz));
    }
}
